<template>
  <el-row>
    <el-form label-position="left" label-width="110px">
      <el-col :span="24">
        <Portlet title="厂家信息">
          <el-row>
            <el-col :lg="8" :md="12" :xl="6">
              <el-form-item label="厂家编号:">
                <span>{{ manufactorData.manufacturersNo }}</span>
              </el-form-item>
            </el-col>

            <el-col :lg="8" :md="12" :xl="6">
              <el-form-item label="厂家名称:">
                <span>{{ manufactorData.manufacturersName }}</span>
              </el-form-item>
            </el-col>

            <el-col :lg="8" :md="12" :xl="6">
              <el-form-item label="类型:">
                <span>{{ manufactorData.manufacturersType }}</span>
              </el-form-item>
            </el-col>

            <el-col :lg="8" :md="12" :xl="6">
              <el-form-item label="所属公司名称:">
                <span>{{ manufactorData.companyName }}</span>
              </el-form-item>
            </el-col>

            <el-col :lg="8" :md="12" :xl="6">
              <el-form-item label="厂家联系人:">
                <span>{{ manufactorData.manufacturersUserName }}</span>
              </el-form-item>
            </el-col>

            <el-col :lg="8" :md="12" :xl="6">
              <el-form-item label="厂家联系电话:">
                <span>{{ manufactorData.manufacturersUserPhone }}</span>
              </el-form-item>
            </el-col>

            <el-col :lg="8" :md="12" :xl="6">
              <el-form-item label="状态:">
                <span>{{ manufactorData.state ? '启用' : '禁用' }}</span>
              </el-form-item>
            </el-col>

          </el-row>
        </Portlet>

        <Portlet>
          <el-row>
            <el-col :span="24" class="text-center">
              <el-button @click.prevent="toEdit" type="primary">修改</el-button>
            </el-col>
          </el-row>
        </Portlet>
      </el-col>
    </el-form>
  </el-row>
</template>
<script>

import {httpGetResponse} from '@/utils/ajax'
import {filterDataBaseDictionary} from '@/filters'

export default {
  name: 'WarehousingShow',
  filters: {
    filterDataBaseDictionary
  },
  data() {
    return {
      id: this.$route.params.id,
      manufactorData: {}
    }
  },
  created() {
    this.getData()
  },
  computed: {},
  methods: {
    getData() {
      httpGetResponse('/ms-warehouse-order/basicData/findManufacturersInfo', {manufacturersId: this.id}).then(response => {
        if (!response.data) {
          return
        }
        this.manufactorData = response.data || {}
      })
    },
    // 去编辑
    toEdit() {
      this.$router.push({path: '/ss-oms/basic-data/manufactor/edit/' + this.id})
    }
  }
}
</script>
